package com.example.demo.service.impl;


import com.example.demo.dao.RegisterDao;
import com.example.demo.result.Result;
import com.example.demo.result.ResultUtil;
import com.example.demo.service.PayLoadService;
import com.example.demo.util.BASE64Util;
import org.apache.logging.log4j.util.Base64Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PayLoadServiceImpl implements PayLoadService {

    @Autowired
    private RegisterDao registerDao;

    @Override
    public boolean successPayLoad(String base64str, String serialNumber,String imgUrl) {
           if (BASE64Util.GenerateImage(base64str,serialNumber)){
               return registerDao.insertUrl(imgUrl,serialNumber);
           }else {
               return false;
           }
    }
}
